﻿using FluentNHibernate.Mapping;
using AdventureWorks.Domain;
namespace AdventureWorks.DataAccess.Mappings
{
    public class SpecialOfferMapping : AuditableEntityMap<SpecialOffer>
    {
        public SpecialOfferMapping() : base()
        {
            Schema("Sales");
            Table("SpecialOffer");
            Id(x => x.Id,"SpecialOfferId").GeneratedBy.Native();
            Map(x => x.Category);
            Map(x => x.Description);
            Map(x => x.DiscountPct);
            Map(x => x.EndDate);
            Map(x => x.MaxQuantity, "MaxQty");
            Map(x => x.MinQuantity, "MinQty");
            Map(x => x.StartDate);
            Map(x => x.Type);
        }
    }
}
